<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="common::header"></head>
<body>
<div class="layui-fluid">
	<div class="layui-row">
		<div class="layui-col-md12">
			<div class="layui-card">
				<div class="layui-card-header t-title layui-bg-cyan mlk-title">用户信息维护</div>
				<div class="layui-card-body">
					<table id="user-table" class="layui-table" lay-filter="user-table"></table>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<!-- 用户更新弹出层 -->
<div id="updateUserDialog" class="mlk-hide">
	<div class="layui-fluid">
		<form class="layui-form layui-form-pane" lay-filter="updateForm">
			<input type="hidden" name="id"/>
		    <div class="layui-form-item">
			    <label class="layui-form-label">用户姓名</label>
			    <div class="layui-input-block">
			      <input type="text" name="name" required  lay-verify="required" placeholder="请输入用户姓名" autocomplete="off" class="layui-input">
			    </div>
		    </div>
		    <div class="layui-form-item">
			    <label class="layui-form-label">手机号码</label>
			    <div class="layui-input-block">
			      <input type="text" name="telephone"  placeholder="请输入用户手机号码" autocomplete="off" class="layui-input">
			    </div>
		    </div>
		    <div class="layui-form-item">
			    <label class="layui-form-label">邮箱</label>
			    <div class="layui-input-block">
			      <input type="text" name="mail"  placeholder="请输入用户邮箱" autocomplete="off" class="layui-input">
			    </div>
		    </div>
		    <div class="layui-form-item">
			    <label class="layui-form-label">部门名称</label>
			    <div class="layui-input-block">
			      <input type="hidden" name="deptId" id="deptId">
			      <a class="layui-btn layui-btn-blue" href="#" id="deptName"><span></span></a>
			    </div>
		    </div>
			<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">备注信息</label>
			    <div class="layui-input-block">
			      <textarea name="remark" placeholder="请输入备注信息" class="layui-textarea"></textarea>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <div class="layui-input-block">
			      <button class="layui-btn " lay-submit lay-filter="updateUserSubmit">立即提交</button>
			      <button class="layui-btn mlk-hide"  type="reset" id="updateReset"></button>
			    </div>
			  </div>	        	    	    
		</form>
	</div>
</div>

<!-- 部门树的内容 -->
<div class="layui-fluid mlk-hide" id="deptTree">
	<input type="hidden" id="deptOpsType">
	<form class="layui-form">
	    <div class="layui-form-item">
	        <label class="layui-form-label">选择部门</label>
	        <div class="layui-input-block">
	            <div id="LAY-auth-tree-index"></div>
	        </div>
	    </div>
		<div class="layui-form-item">
			<div class="layui-form-block">
				<a href="#" class="layui-btn layui-btn-normal layui-btn-fluid"  id="confirmDept">确认</a>
			</div>
		</div>
	</form>
</div>

<!-- 角色列表的内容 -->
<div class="layui-fluid mlk-hide" id="roleDialog">
	<div class="layui-row">
		<input type="hidden" id="roleId">
		<form class="layui-form" id="roleForm" lay-filter="roleForm">
		</form>
	</div>
</div>


<!-- 新增用户 -->
<div id="addUserDialog" class="mlk-hide">
	<div class="layui-fluid">
		<form class="layui-form layui-form-pane" lay-filter="addForm">
			<input type="hidden" name="id"/>
		    <div class="layui-form-item">
			    <label class="layui-form-label">用户姓名</label>
			    <div class="layui-input-block">
			      <input type="text" name="name" required  lay-verify="required" placeholder="请输入用户姓名" autocomplete="off" class="layui-input">
			    </div>
		    </div>
		    <div class="layui-form-item">
			    <label class="layui-form-label">用户账号</label>
			    <div class="layui-input-block">
			      <input type="text" name="username" required  lay-verify="required" placeholder="请输入用户账号" autocomplete="off" class="layui-input">
			    </div>
		    </div>
		    <div class="layui-form-item">
			    <label class="layui-form-label">手机号码</label>
			    <div class="layui-input-block">
			      <input type="text" name="telephone"  placeholder="请输入用户手机号码" autocomplete="off" class="layui-input">
			    </div>
		    </div>
		    <div class="layui-form-item">
			    <label class="layui-form-label">邮箱</label>
			    <div class="layui-input-block">
			      <input type="text" name="mail"  placeholder="请输入用户邮箱" autocomplete="off" class="layui-input">
			    </div>
		    </div>
		     <div class="layui-form-item">
			    <label class="layui-form-label">用户密码</label>
			    <div class="layui-input-block">
			      <input type="text" name="password"  placeholder="请输入用户密码" autocomplete="off" class="layui-input">
			    </div>
		    </div>
		    <div class="layui-form-item">
			    <label class="layui-form-label">部门名称</label>
			    <div class="layui-input-block">
			      <a class="layui-btn layui-btn-blue" href="#" id="addDeptName"><span>部门选择</span></a>
			      <input type="hidden" name="deptId" id="addDeptId">
			    </div>
		    </div>
			<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">备注信息</label>
			    <div class="layui-input-block">
			      <textarea name="remark" placeholder="请输入备注信息" class="layui-textarea"></textarea>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <div class="layui-input-block">
			      <button class="layui-btn" lay-submit lay-filter="addUserSubmit">立即提交</button>
			      <button class="layui-btn mlk-hide"  type="reset" id="addReset"></button>
			    </div>
			  </div>	        	    	    
		</form>
	</div>
</div>

<script type="text/html" id="toolbar">
<a class="layui-btn layui-btn" lay-event="add">用户新增</a>
</script>

<script type="text/html" id="tool">
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="onOrOff">冻结或激活</a>
<a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="updateUser">编辑</a>
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="roleAlocate">角色分配</a>
</script>
<div th:include="common::footer"></div>
<script type="text/javascript" th:src="@{/js/rbac/user.js}"></script>
</html>